]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
style: Disable camelcase rule for GObject properties
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 1 Feb 2019 00:16:20 +0000 (01:16 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 23 Jul 2019 22:28:45 +0000 (00:28 +0200)
For GObject properties, we follow the convention of all-lowercase,
dash-separated names. Those translate to underscores in getters/setters,
so exempt them from the newly added "camelcase" rule.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

js/misc/systemActions.js
js/perf/core.js
js/perf/hwtest.js
js/ui/altTab.js
js/ui/layout.js
js/ui/padOsd.js

index 9aeb680ed32a9380eddf60bf40786b68f231cebd..7ab200a455ecdc82d8f538d97fa8950ff351d08f 100644 (file)
@@ -188,30 +188,37 @@ const SystemActions = GObject.registerClass({
         this._sessionUpdated();
     }
 
+    // eslint-disable-next-line camelcase
     get can_power_off() {
         return this._actions.get(POWER_OFF_ACTION_ID).available;
     }
 
+    // eslint-disable-next-line camelcase
     get can_suspend() {
         return this._actions.get(SUSPEND_ACTION_ID).available;
     }
 
+    // eslint-disable-next-line camelcase
     get can_lock_screen() {
         return this._actions.get(LOCK_SCREEN_ACTION_ID).available;
     }
 
+    // eslint-disable-next-line camelcase
     get can_switch_user() {
         return this._actions.get(SWITCH_USER_ACTION_ID).available;
     }
 
+    // eslint-disable-next-line camelcase
     get can_logout() {
         return this._actions.get(LOGOUT_ACTION_ID).available;
     }
 
+    // eslint-disable-next-line camelcase
     get can_lock_orientation() {
         return this._actions.get(LOCK_ORIENTATION_ACTION_ID).available;
     }
 
+    // eslint-disable-next-line camelcase
     get orientation_lock_icon() {
         return this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName;
     }
index 0eab4747079a99a0d166afb0c757bc1aa9681949..314d3ecf55f8727ba3becc185e620e47dbf50727 100644 (file)
@@ -3,6 +3,7 @@
             script_applicationsShowStart, script_applicationsShowDone,
             script_afterShowHide, malloc_usedSize, glx_swapComplete,
             clutter_stagePaintDone */
+/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^malloc", "^glx", "^clutter"] }] */
 
 const System = imports.system;
 
index f4fe64d96080c7b97a68427c22c6c58b91f8e8d0..e74ba25ac5a312b3af830310d86046c40d96692b 100644 (file)
@@ -6,6 +6,7 @@
             script_redrawTestDone, script_collectTimings,
             script_geditLaunch, script_geditFirstFrame,
             clutter_stagePaintStart, clutter_paintCompletedTimestamp */
+/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^clutter"] }] */
 const { Clutter, Gio, Shell } = imports.gi;
 const Main = imports.ui.main;
 const Scripting = imports.ui.scripting;
index 6ba3ac99f8ed0c07d7d800f31e1f44ff4fa1bad4..e4e191a170ce8cf1e0ec3f4695ec67fb5a50ca31 100644 (file)
@@ -662,6 +662,7 @@ class AppIcon extends St.BoxLayout {
         this.add(this.label, { x_fill: false });
     }
 
+    // eslint-disable-next-line camelcase
     set_size(size) {
         this.icon = this.app.create_icon_texture(size);
         this._iconBin.child = this.icon;
index 5a963d75611de25672ac49382942497f84b64260..37dd1ffcca54f7f4a548e99baee34c3113cbd7c1 100644 (file)
@@ -81,10 +81,12 @@ var MonitorConstraint = GObject.registerClass({
         this.notify('index');
     }
 
+    // eslint-disable-next-line camelcase
     get work_area() {
         return this._workArea;
     }
 
+    // eslint-disable-next-line camelcase
     set work_area(v) {
         if (v == this._workArea)
             return;
index 5f2c85dcd889c5881d4041b993938f884c3dbdb9..a900a01162c2ded05494c31b9d518214cf61c247 100644 (file)
@@ -307,10 +307,12 @@ var PadDiagram = GObject.registerClass({
         super._init(params);
     }
 
+    // eslint-disable-next-line camelcase
     get left_handed() {
         return this._leftHanded;
     }
 
+    // eslint-disable-next-line camelcase
     set left_handed(leftHanded) {
         this._leftHanded = leftHanded;
     }
@@ -329,10 +331,12 @@ var PadDiagram = GObject.registerClass({
         this._handle = this._composeStyledDiagram();
     }
 
+    // eslint-disable-next-line camelcase
     get editor_actor() {
         return this._editorActor;
     }
 
+    // eslint-disable-next-line camelcase
     set editor_actor(actor) {
         actor.hide();
         this._editorActor = actor;